package com.huitu.whht.base.core.api.wrem.cons;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wrem.cons.entities.WremConsDecB;

import com.huitu.whht.base.core.api.wrem.cons.entities.WremConsDecBQo;
import com.huitu.whht.base.core.api.wrem.cons.service.IWremConsDecBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 应急会商决策信息表API,表名称: T_WHHT_WREM_CONS_DEC_B <br/>
 * 日期: 2019-04-15
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("generate/cons/dec/b")
public class WremConsDecBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WremConsDecBResource.class);

    private static final String UUID = "b3cda124-1fc1-4186-afac-c19048d39418";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWremConsDecBService wremConsDecBService;

    /**
     * @api {get} generate/cons/dec/b/{consId} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/cons/dec/b/f5416c81-73ef-49b5-970c-f62a8913354a
     * @apiParam   {String}         consId             【必须】应急会商代码
     * @apiSuccess {String}         consDecId          主键ID
     * @apiSuccess {String}         consId             应急会商代码
     * @apiSuccess {Date}           actualBgTm         会商实际开始时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Date}           actualEdTm         会商实际结束时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         keyword            关键字
     * @apiSuccess {String}         planId             应急处置方案代码
     * @apiSuccess {String}         consRecord         会议记录
     * @apiSuccess {String}         consDec            会议决策
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{consId}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("consId") String consId) {
        LOGGER.info("根据主键查询 应急会商决策信息表,参数 consId:{}", consId);
        return Response.ok(ApiResultBuilder.create(this, wremConsDecBService.selectByPrimaryKey(consId))).build();
    }

    /**
     * @api {post} generate/cons/dec/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/cons/dec/b/list
     * @apiParam   {List(String)}   consDecIdList      (数组)主键ID
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {List(String)}   consIdList         (数组)应急会商代码
     * @apiParam   {String}         consId             应急会商代码
     * @apiParam   {Date}           actualBgTmBgTm     (开始时间)会商实际开始时间
     * @apiParam   {Date}           actualBgTmEdTm     (结束时间)会商实际开始时间
     * @apiParam   {Date}           actualEdTmBgTm     (开始时间)会商实际结束时间
     * @apiParam   {Date}           actualEdTmEdTm     (结束时间)会商实际结束时间
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {List(String)}   planIdList         (数组)应急处置方案代码
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiSuccess {String}         consDecId          主键ID
     * @apiSuccess {String}         consId             应急会商代码
     * @apiSuccess {Date}           actualBgTm         会商实际开始时间
     * @apiSuccess {Date}           actualEdTm         会商实际结束时间
     * @apiSuccess {String}         keyword            关键字
     * @apiSuccess {String}         planId             应急处置方案代码
     * @apiSuccess {String}         consRecord         会议记录
     * @apiSuccess {String}         consDec            会议决策
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WremConsDecBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 应急会商决策信息表,参数 WremConsDecBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wremConsDecBService.selectList(filter))).build();
    }

    /**
     * @api {put} generate/cons/dec/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)add data
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {String}         consId             【必须】应急会商代码
     * @apiParam   {Date}           actualBgTm         会商实际开始时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           actualEdTm         会商实际结束时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest generate/cons/dec/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "consId": "f5416c81-73ef-49b5-970c-f62a8913354a"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "consId": "f5416c81-73ef-49b5-970c-f62a8913354a"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WremConsDecB record) {
        LOGGER.info("新增 应急会商决策信息表,参数 WremConsDecB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wremConsDecBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} generate/cons/dec/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {String}         consId             【必须】应急会商代码
     * @apiParam   {Date}           actualBgTm         会商实际开始时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           actualEdTm         会商实际结束时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest generate/cons/dec/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "consId": "f5416c81-73ef-49b5-970c-f62a8913354a"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "consId": "f5416c81-73ef-49b5-970c-f62a8913354a"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WremConsDecB> recordList) {
        LOGGER.info("批量新增 应急会商决策信息表,参数 WremConsDecB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wremConsDecBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} generate/cons/dec/b/{consId}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)update data
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {String}         consId             【必须】应急会商代码
     * @apiParam   {Date}           actualBgTm         会商实际开始时间
     * @apiParam   {Date}           actualEdTm         会商实际结束时间
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           ts                 时间戳
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest generate/cons/dec/b/f5416c81-73ef-49b5-970c-f62a8913354a/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{consId}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("consId") String consId, WremConsDecB record) {
        record.setConsId(consId);
        LOGGER.info("根据主键修改 应急会商决策信息表,参数 WremConsDecB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremConsDecBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} generate/cons/dec/b/{consId}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {String}         consId             应急会商代码
     * @apiParam   {Date}           actualBgTm         会商实际开始时间
     * @apiParam   {Date}           actualEdTm         会商实际结束时间
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           ts                 时间戳
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest generate/cons/dec/b/f5416c81-73ef-49b5-970c-f62a8913354a/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{consId}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("consId") String consId, WremConsDecB record) {
        record.setConsId(consId);
        LOGGER.info("根据主键修改(只修改非null字段) 应急会商决策信息表,参数 WremConsDecB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremConsDecBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} generate/cons/dec/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {String}         consId             应急会商代码
     * @apiParam   {Date}           actualBgTm         会商实际开始时间
     * @apiParam   {Date}           actualEdTm         会商实际结束时间
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           ts                 时间戳
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  generate/cons/dec/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "consDecId": "7addf435-3eed-4c30-a0db-7b9cbd2c0071",
     * "consId": "f5416c81-73ef-49b5-970c-f62a8913354a",
     * "actualBgTm": "2017-12-18 18:14:00.0",
     * "actualEdTm": "2018-12-18 18:14:00.0",
     * "keyword": "暂无",
     * "planId": "e741bcb8-2491-4573-9b12-449371c5e738",
     * "consRecord": "oracle.sql.CLOB@34b127",
     * "consDec": "oracle.sql.CLOB@19dd234",
     * "ts": "2018-12-18 18:16:36.0"
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WremConsDecB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 应急会商决策信息表,参数 WremConsDecB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremConsDecBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} generate/cons/dec/b/{consId} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/cons/dec/b/f5416c81-73ef-49b5-970c-f62a8913354a
     * @apiParam   {String}         consId             【必须】应急会商代码
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{consId}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("consId") String consId) {
        LOGGER.info("根据主键删除 应急会商决策信息表,参数 consId:{}", consId);
        Integer rows = wremConsDecBService.deleteByPrimaryKey(consId);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} generate/cons/dec/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除T_WHHT_WREM_CONS_DEC_B(应急会商决策信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WREM_CONS_DEC_B-应急会商决策信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/cons/dec/b/by-filter
     * @apiParam   {List(String)}   consDecIdList      (数组)主键ID
     * @apiParam   {String}         consDecId          主键ID
     * @apiParam   {List(String)}   consIdList         (数组)应急会商代码
     * @apiParam   {String}         consId             应急会商代码
     * @apiParam   {Date}           actualBgTmBgTm     (开始时间)会商实际开始时间
     * @apiParam   {Date}           actualBgTmEdTm     (结束时间)会商实际开始时间
     * @apiParam   {Date}           actualEdTmBgTm     (开始时间)会商实际结束时间
     * @apiParam   {Date}           actualEdTmEdTm     (结束时间)会商实际结束时间
     * @apiParam   {String}         keyword            关键字
     * @apiParam   {List(String)}   planIdList         (数组)应急处置方案代码
     * @apiParam   {String}         planId             应急处置方案代码
     * @apiParam   {String}         consRecord         会议记录
     * @apiParam   {String}         consDec            会议决策
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WremConsDecBQo filter) {
        LOGGER.info("根据条件删除 应急会商决策信息表,参数 WremConsDecBQo:{}", filter);
        Integer rows = wremConsDecBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
